using System;
using UnityEngine;

public class SkinResizeParticle : SkinResizeListener
{
	[Serializable]
	public class EditorReferences
	{
		public float minSize = 1f;

		public float maxSize = 20f;
	}

	[SerializeField]
	public EditorReferences references = new EditorReferences();

	private ParticleSystem[] _particles;

	public override void OnSizeChanged(float ratio)
	{
		if (_particles == null)
		{
			_particles = GetComponentsInChildren<ParticleSystem>();
		}
		float num = Mathf.Lerp(references.minSize, references.maxSize, ratio);
		ParticleSystem[] particles = _particles;
		foreach (ParticleSystem particleSystem in particles)
		{
			particleSystem.transform.localScale = new Vector3(num, num, num);
		}
	}
}
